
<?php 
include'connecsi.php';
$poli=$_POST[poli];
$biaya=$_POST[biaya];
$simpan=$_GET[simpan];
$bilang=$_GET[bilang];
?>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
<table width="100%" align="center" border="0" cellspacing="1" cellpadding="1" bgcolor="#000000">
<tr><td>
<table width="100%" align="center" border="0" cellspacing="1" cellpadding="1" bgcolor="#ffffff">
<tr><td>
<table width="100%"align="center" border="0" cellspacing="1" cellpadding="1">
  <tr>
	<td></td>
  </tr>
  <tr>
	<td>
	<table width="85%"  border="0" cellspacing="1" cellpadding="1">
	  <tr>
		<td colspan="6">
		<?php
		if($_GET[aksi]=="simpan")
		{
			if((empty($poli)) or (empty($biaya)))							
			{echo "<script>alert('Lengkapi Form')</script>";
			echo"<meta http-equiv=refresh content=0;URL='home.php?ling=poli'>";}
			else
			{
			$proses_3="insert into db_poli(NAMA_POLI,HARGA) values ('$poli','$biaya') ";
			$prosesgagal="<center><span class=style13>Poli Sudah Diinput</span></center>";echo"<meta http-equiv=refresh content=2;URL='home.php?ling=poli'>";
			$queri_3=mysql_query($proses_3)or die($prosesgagal);
			if($queri_3)
			{
			echo "<script>alert('Data Masuk Sudah')</script>";echo"<meta http-equiv=refresh content=0;URL='home.php?ling=poli'>";
			}
			}
		}
		elseif($_GET[aksi]=="hapus")
		{
			$dihapus=mysql_query("delete from db_poli where NAMA_POLI='$bilang' ");
			if($dihapus)
			{ echo"<meta http-equiv=refresh content=0;URL='home.php?ling=poli'>"; }
		}	
		?>		</td>
	  </tr>
	  <form action="home.php?ling=poli&aksi=simpan" method="post" id="formsign" autocomplete="off">
  <tr>
    <td width="108" height="21">Nama Poli </td>
    <td width="1"><div align="center"><strong>:</strong></div></td>
    <td width="1">&nbsp;</td>
    <td width="505"><input type="text" id="poli" name="poli" /></td>
  </tr>
  <tr>
    <td height="21">Biaya Periksa </td>
    <td><strong>:</strong></td>
    <td>&nbsp;</td>
    <td><input type="text" id="biaya" name="biaya" /></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="5"><div align="center"><input type="submit" name="submit" value="Simpan">&nbsp;</div></td>
  </tr>
	  </form>
	</table>
	</td>
  </tr>
</table></td></tr>
</table>
</td></tr>
</table>
<table width="100%" bgcolor="#FFFFFF" align="center" border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td colspan="6" bgcolor="#000000"><div align="center" class="style11 style1"><font size="2">Tabel Poli</font></div></td>
  </tr>
  <tr bgcolor="#D7D5D6">
    <td width="19%" align="center"><font color="d7d5d6">a</font><font color="#FFFFFF">NAma Poli</font><font color="d7d5d6">a</font></td>
	<td width="15%" align="center"><font color="d7d5d6">aaa</font><font color="#FFFFFF">Biaya</font><font color="d7d5d6">aaa</font></td>
  
  </tr>
  <?php
	  $ambil1="select * from db_poli order By NAMA_POLI ";
	  $ambil2=mysql_query($ambil1)or die("maaf error");
	  while($ambil3=mysql_fetch_array($ambil2)) {
	  ?>
  <tr>
    <td><font><? echo"$ambil3[NAMA_POLI]";?></font></td>
	<td><font><? echo"$ambil3[HARGA]";?></font></td>
	
  </tr>
  <? } ?>
  <tr>
    <td colspan="6" bgcolor="#000000">&nbsp;</td>
  </tr>
</table>